@ECHO OFF

REM ** *************************************************************************
REM ** Run this batch file to publish (push) the NuGet packages for SaltFx
REM ** *************************************************************************

SET NUGET_API_KEY=706455f7-0f27-422b-9255-55e7a81ef8a6
SET NUGET_SOURCE_FOLDER=..\bin\
SET NUGET_PATH="..\.nuget\NuGet.exe"

ECHO BuildNugetPackage START

ECHO [Variables]----------------------------------------------------------------

ECHO Using NUGET_SOURCE_FOLDER: %NUGET_SOURCE_FOLDER%
ECHO Using NUGET_PATH: %NUGET_PATH%

ECHO [Environment Check]--------------------------------------------------------

IF NOT EXIST %NUGET_PATH% GOTO NugetNotFound
ECHO %NUGET_PATH% found!

ECHO All environment checks passed!

ECHO [Publish]------------------------------------------------------------------

%NUGET_PATH% setapikey %NUGET_API_KEY%
%NUGET_PATH% push %NUGET_SOURCE_FOLDER%*.nupkg

GOTO Finish

:NugetNotFound
ECHO [ERROR]********************************************************************

ECHO %NUGET_PATH% could not be found! Are you sure NuGet and the NuGet Command Line are installed on this computer?
GOTO Finish

:Finish
ECHO [Finish]-------------------------------------------------------------------